package com.minyifang.wcspf.work.ui.user.presenter;

import android.view.accessibility.AccessibilityManager;

import com.minyifang.wcspf.common.base.BasePresenter;
import com.minyifang.wcspf.common.config.network.Constants;
import com.minyifang.wcspf.common.config.network.RetrofitHelper;
import com.minyifang.wcspf.work.ui.user.view.SettingView;

import okhttp3.MediaType;
import okhttp3.RequestBody;

/**
 * Created by LuoYaWei on 2018/6/25.
 */
public class SettingPresenter extends BasePresenter<SettingView> {
    public void getAboutUsData() {
        RequestBody requestBody = RequestBody.create(MediaType.parse("application/json"), Constants.getJsonData(null, null).toString());
        addTask(RetrofitHelper.getInstance().getService().getAboutUsData(requestBody), respond -> getView().showAboutUsData(respond));
    }

    public void getVersionIntroduction() {
        RequestBody requestBody = RequestBody.create(MediaType.parse("application/json"), Constants.getJsonData(null, null).toString());
        addTask(RetrofitHelper.getInstance().getService().getVersionIntroduction(requestBody), respond -> getView().showVersionIntroductionData(respond));
    }
}
